<?php

namespace Lib\Api;

class Oss_AliyunOss {

	/**
	 * @param array $options
	 * array(
	 * 'oss_id' => '',
	 * 'oss_key' => '',
	 * 'oss_bucket' => 'test',
	 * 'oss_endpoint' => 'oss-cn-beijing.aliyuncs.com',
	 * 'oss_bucket_url' => 'https://test.oss-cn-beijing.aliyuncs.com',
	 * 'oss_url' => 'https://test.oss-cn-beijing.aliyuncs.com',
	 * )
	 */
	public function __construct(array $options = []) {
	}

	/**
	 * 连接测试
	 * @return void
	 */
	public function testOSS() {
	}

	/**
	 * 设置跨域
	 * @return void
	 */
	public function setCors() {
	}

	/**
	 * 判断是否存在
	 * @param $object
	 * @return void
	 */
	public function isObject($object) {
	}

	/**
	 * 获取文件列表
	 * @param $prefix
	 * @param $marker
	 * @param $limit
	 * @param $delimiter
	 * @return void
	 */
	public function getFilesList($prefix = '', $marker = '', $limit = 100, $delimiter = '') {
	}

	/**
	 * 上传数据
	 * @param $data
	 * @param $object
	 * @param $Acl
	 * @return void
	 */
	public function uploadData($data, $object, $Acl = null) {
	}

	/**
	 * 上传文件
	 * @param $file，请用 \Lib\Dev::LocalFile() 的返回值
	 * @param $object
	 * @param $Acl
	 * @return void
	 */
	public function uploadFile($file, $object, $Acl = null) {
	}

	/**
	 * 设置权限 private/public
	 * @param $object
	 * @param $Acl
	 * @return void
	 */
	public function setAcl($object, $Acl = null) {
	}

	/**
	 * json 形式返回对象
	 * @param $dir
	 * @param $object
	 * @param $length
	 * @return void
	 */
	public function getPolicy($dir, $object, $length = 1048576000) {
	}

	/**
	 * 获取签名 URL
	 * @param $object
	 * @param $filename
	 * @param $e
	 * @return void
	 */
	public function signUrl($object, $filename = '', $e = 3600) {
	}

	/**
	 * 改名
	 * @param $oldObject
	 * @param $newObject
	 * @param $MimeType
	 * @return void
	 */
	public function renameObject($oldObject, $newObject, $MimeType = null) {
	}


	/**
	 * 下载文件
	 * @param $file
	 * @param $object
	 * @return void
	 */
	public function downFile($file, $object) {
	}

	/**
	 * 删除文件
	 * @param $objects
	 * @return void
	 */
	public function deleteFile($objects) {
	}

}